/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package test;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Date;
import java.util.logging.Level;
import java.util.logging.Logger;


/**
 *
 * @author javauser
 */
public class testTask {

    public static void main(String args[]) {
        FileOutputStream fos = null;
        try {
            //ScheduledTask sTask = new ScheduledTask();
            //sTask.add(null, null, new Date("6-JUN-2011"), "17:13", null);
            String task = "crontab /home/javauser/Desktop/ro2a";
            fos = new FileOutputStream("/home/javauser/Desktop/hello");
            
            byte[] b = task.getBytes();
            fos.write(b);
        } catch (FileNotFoundException ex) {
            Logger.getLogger(testTask.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(testTask.class.getName()).log(Level.SEVERE, null, ex);
        } finally {
            try {
                fos.close();
            } catch (IOException ex) {
                Logger.getLogger(testTask.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }
}
